package com.example.photograph.domain;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;

/**
 * 功能描述:
 *
 * @author panhm
 * @date 2022-06-15
 * @Description:
 */
public class Md5Util {
    public static void main(String[] args) {
        System.out.println(toMD5("474142"));
    }
    public static String toMD5(String str){
        String md5 = DigestUtils.md5DigestAsHex(str.getBytes(StandardCharsets.UTF_8));
        return md5;
    }
}